package J1_8;

import java.util.Scanner;

public class J108task1 {
    public static void main(String[] args) {
        int s;
        float x,sun;
        sun=0;
        Scanner scanner =new Scanner(System.in);
        System.out.printf("请输入购买图书的数量:");
        s= scanner.nextInt();
        System.out.printf("请输入购买图书的单价:");
        x=scanner.nextFloat();
        sun=s*x;
        if(s<10){
            sun=sun*1f;
        }
        else if (s>=10&&s<100){
            sun=sun*0.85f;
        }
        else {
            sun=sun*0.8f;
        }
        System.out.println("最后的总价格为:"+sun);
    }
}
